﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using System;
using System.Collections.Generic;
using System.ServiceModel;
using FinPlusInterfaces;

namespace FinPlusBaseCore
{
    [ServiceContract(SessionMode = SessionMode.Allowed, CallbackContract = typeof(IPodCallback))]
    public interface IFinPlusServices
    {
        [OperationContract]
        [FaultContract(typeof(Exception))]
        void GetPods(Env env, string user, string config, string serviceKey, string serviceType, string query, string guid);

        [OperationContract]
        [FaultContract(typeof(Exception))]
        void SavePod(Env env, string user, string config, string serviceKey, IEnumerable<Bean> pod, ChangeType changeType, string guid);

        [OperationContract]
        [FaultContract(typeof(Exception))]
        void AlterPod(Env env, string user, string config, string serviceKey, DateTime timeStamp, string Type, int id, string beanName, object value);

        [OperationContract]
        [FaultContract(typeof(Exception))]
        IEnumerable<IEnumerable<Bean>> Infos();

        [OperationContract]
        [FaultContract(typeof(Exception))]
        bool Stop(string serviceKey);
        
        [OperationContract]
        [FaultContract(typeof(Exception))]
        bool Start(string serviceKey);

        [OperationContract]
        void Dispose(Env env, string user, string config, string serviceKey, string guid);
    }
}
